Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  What does the following function print for n ... Start Learning for Free
What does the following function print for n = 25?
void fun(int n)
{
if (n == 0)
return;
printf("%d", n%2);
fun(n/2);
  • a)
    11001
  • b)
    10011
  • c)
    11111
  • d)
    00000
Correct answer is option 'B'. Can you explain this answer?
Most Upvoted Answer
What does the following function print for n = 25?void fun(int n){if (...
The function mainly prints binary representation in reverse order.
Free Test
Community Answer
What does the following function print for n = 25?void fun(int n){if (...
The function is incomplete and cannot be executed as is. The printf statement is missing its closing parentheses and semicolon, and the code block inside the if statement is not given. Without this information, it is impossible to determine what the function prints for n = 25.
Explore Courses for Computer Science Engineering (CSE) exam
Question Description
What does the following function print for n = 25?void fun(int n){if (n == 0)return;printf("%d", n%2);fun(n/2);a)11001b)10011c)11111d)00000Correct answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2025 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about What does the following function print for n = 25?void fun(int n){if (n == 0)return;printf("%d", n%2);fun(n/2);a)11001b)10011c)11111d)00000Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for What does the following function print for n = 25?void fun(int n){if (n == 0)return;printf("%d", n%2);fun(n/2);a)11001b)10011c)11111d)00000Correct answer is option 'B'. Can you explain this answer?.
Solutions for What does the following function print for n = 25?void fun(int n){if (n == 0)return;printf("%d", n%2);fun(n/2);a)11001b)10011c)11111d)00000Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of What does the following function print for n = 25?void fun(int n){if (n == 0)return;printf("%d", n%2);fun(n/2);a)11001b)10011c)11111d)00000Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of What does the following function print for n = 25?void fun(int n){if (n == 0)return;printf("%d", n%2);fun(n/2);a)11001b)10011c)11111d)00000Correct answer is option 'B'. Can you explain this answer?, a detailed solution for What does the following function print for n = 25?void fun(int n){if (n == 0)return;printf("%d", n%2);fun(n/2);a)11001b)10011c)11111d)00000Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of What does the following function print for n = 25?void fun(int n){if (n == 0)return;printf("%d", n%2);fun(n/2);a)11001b)10011c)11111d)00000Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice What does the following function print for n = 25?void fun(int n){if (n == 0)return;printf("%d", n%2);fun(n/2);a)11001b)10011c)11111d)00000Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam
Signup to solve all Doubts
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev